import { Prefab, SpriteFrame } from 'cc';
import { BaseStage, SceneInfo, app } from '../../../extensions/cc-feather/assets/src';

/**
 * - 作者: DoooReyn
 * - 日期: 2023.11.01
 * - 名称: BootStage
 * - 描述: 首屏舞台
 */
export class BootStage extends BaseStage {
    /** 场景信息 */
    public get sceneInfo(): SceneInfo {
        return {
            scene: 'BootStage',
            bundle: 'resources',
            assetsToLoad: [
                { path: 'prefab/BootScreen', type: Prefab },
                { path: 'prefab/BootWindow', type: Prefab },
                { path: 'prefab/BootPopup', type: Prefab },
                { path: 'image/Loading1/spriteFrame', type: SpriteFrame },
            ],
            screen: 'prefab/BootScreen',
            bigLoading: 'prefab/BootBigLoading',
            background: {
                path: 'image/Loading1/spriteFrame',
                fitMode: 0,
            },
        };
    }

    public async onEnter(): Promise<void> {
        this.logger.debug('进入舞台');
    }
    public async onExit(): Promise<void> {
        this.logger.debug('离开舞台');
    }
    public async onTransitionEnter(): Promise<void> {
        this.logger.debug('开幕过渡');
    }
    public async onTransitionExit(): Promise<void> {
        this.logger.debug('闭幕过渡');
    }
}
